/*******************************************************************************
** www.IfcGears.com                                                           **
** Copyright (C) 2010 - Bauhaus University Weimar, www.uni-weimar.de          **
** Written: 2010-10-02, Fabian Gerold, www.fabiangerold.de                    **
*******************************************************************************/

#include <assert.h>
#include "gears/IfcGears.h"
#include "schema/entity/Attribute.h"
#include "schema/type/Type.h"
#include "Entity.h"


QString AttributePrimitive::getDataType()
{
	return m_primitive_type;
}
QString AttributePrimitive::getDataTypeWithSmartPointer(bool weak)
{
	return m_primitive_type;
}

// TYPE
QString AttributeType::getDataType()
{
	return m_type->m_classname;
}
QString AttributeType::getDataTypeWithSmartPointer(bool weak)
{
	if(weak)
		return "weak_ptr<" + m_type->m_classname + ">";
	else
		return "shared_ptr<" + m_type->m_classname + ">";
}

// ENTITY
QString AttributeEntity::getDataType()
{
	return m_entity->m_classname;
}
QString AttributeEntity::getDataTypeWithSmartPointer(bool weak)
{
	if(weak)
		return "weak_ptr<" + m_entity->m_classname + ">";
	else
		return "shared_ptr<" + m_entity->m_classname + ">";
}
